<template>
  <div class="use-report">
    <div>
      <label>{{ $t("route.DeviceManager") }}</label>
      <div></div>
      <button>
        <img /><label>{{ $t("route.Temperature_report") }}</label>
      </button>
    </div>

    <div>
      <el-select
        size="default"
        v-model="query.workshop"
        @change="handlePageChange(1)"
        :placeholder="$t('route.Please_select_workshop')"
      >
        <el-option v-for="item in workshopList" :key="item" :label="item" :value="item" />
      </el-select>
      <el-button type="primary" class="mgr-left-10" @click="isShowDrawer = true">{{
        $t("route.More_Filters")
      }}</el-button>

      <el-radio-group v-model="query.timeIndex" @change="getTempList" class="mgr-left-10">
        <el-radio-button label="筛选时间" />
        <el-radio-button label="2小时(单)" />
        <el-radio-button label="2小时(双)" />
      </el-radio-group>

      <div class="div-handle-right">
        <el-button type="primary" class="mgr-left-10" @click="extClick">{{
          $t("route.export")
        }}</el-button>
        <el-button type="success" class="mgr-left-10" @click="editClick">{{
          $t("route.Editing")
        }}</el-button>
        <el-button type="danger" class="mgr-left-10" @click="deleteClick">{{
          $t("route.Delete")
        }}</el-button>
        <el-input
          class="mgr-left-10 width200px"
          v-model="query.search"
          :placeholder="$t('route.Machine_number')"
        />
        <el-button class="mgr-left-10" @click="handlePageChange(1)">{{
          $t("route.search")
        }}</el-button>
        <!-- <el-upload :on-success="inputSuccess" class="mgr-left-10" :show-file-list="true" :action="uploadUrl" :limit="1">
          <el-button type="warning">导入</el-button>
        </el-upload> -->
      </div>
    </div>

    <div>
      <el-table
        @selection-change="selectionChange"
        :data="tableData"
        :row-style="{ height: '50px' }"
      >
        <el-table-column type="selection" width="55" />
        <!-- <el-table-column v-show="false" prop="id" label="编号" /> -->
        <el-table-column prop="createDate" :label="$t('route.date')" />
        <el-table-column prop="createTime" :label="$t('route.time')" />
        <el-table-column prop="workshop" :label="$t('route.Workshop')" />
        <el-table-column prop="proLine" :label="$t('route.Production_line')" />
        <el-table-column
          prop="noseCode"
          :label="$t('route.Machine_number')"
          width="200"
        />
        <el-table-column prop="kind" :label="$t('route.kind')" />
        <el-table-column prop="stdTemp" :label="$t('route.Standard_temperature')" />
        <el-table-column :label="$t('route.Left')">
          <template prop="temp1" #default="scope">
            <div :style="formatTempColorStyle(scope.row.stdTemp, scope.row.temp1)">
              {{ scope.row.temp1 }}
            </div>
          </template>
        </el-table-column>
        <el-table-column prop="temp2" :label="$t('route.Medium')">
          <template prop="temp2" #default="scope">
            <div :style="formatTempColorStyle(scope.row.stdTemp, scope.row.temp2)">
              {{ scope.row.temp2 }}
            </div>
          </template>
        </el-table-column>
        <el-table-column prop="temp3" :label="$t('route.Right')">
          <template prop="temp3" #default="scope">
            <div :style="formatTempColorStyle(scope.row.stdTemp, scope.row.temp3)">
              {{ scope.row.temp3 }}
            </div>
          </template>
        </el-table-column>
      </el-table>
      <div>
        <el-pagination
          background
          @current-change="handlePageChange"
          :current-page="query.pageNum"
          :page-size="query.pageSize"
          layout="total, prev, pager, next"
          :total="query.total"
        ></el-pagination>
      </div>
    </div>

    <el-drawer v-model="isShowDrawer">
      <div class="drawer">
        <div>
          <div>{{ $t("route.Date_selection") }}</div>
          <el-radio-group
            @change="dateTypeChange"
            v-model="drawerValue.dateType"
            size="large"
          >
            <el-radio-button :label="$t('route.today')" />
            <el-radio-button :label="$t('route.yesterday')" />
            <el-radio-button :label="$t('route.This_week')" />
            <el-radio-button :label="$t('route.This_month')" />
            <el-radio-button :label="$t('route.Last_month')" />
            <el-radio-button :label="$t('route.Range')" />
          </el-radio-group>
          <el-date-picker
            v-model="drawerValue.dateRange"
            v-if="drawerValue.dateType == $t('route.Range')"
            type="daterange"
            @change="dateChange"
          />
        </div>

        <div>
          <div>{{ $t("route.Time_selection") }}</div>
          <el-checkbox-group v-model="query.timeRange" size="large">
            <el-checkbox-button
              v-for="item in 24"
              :key="item"
              :label="item < 10 ? '0' + item + ':00' : item + ':00'"
            >
              {{ item < 10 ? "0" + item + " :00" : item + ":00" }}
            </el-checkbox-button>
          </el-checkbox-group>
        </div>

        <div>
          <div>{{ $t("route.Standard_temperature") }}</div>
          <el-radio-group
            v-model="drawerValue.stdTempType"
            size="large"
            @change="stdTempTypeChange"
          >
            <el-radio-button :label="$t('route.Greater_than_or_equal_to')" />
            <el-radio-button :label="$t('route.Less_than_or_equal_to')" />
            <el-radio-button :label="$t('route.Range')" />
          </el-radio-group>
          <div v-show="drawerValue.stdTempType != $t('route.Range')">
            <el-input type="number" v-model="drawerValue.stdTemp" class="width100px" />
          </div>
          <div v-show="drawerValue.stdTempType == $t('route.Range')">
            <el-input type="number" v-model="query.minStdTemp" />
            <div>-</div>
            <el-input type="number" v-model="query.maxStdTemp" />
          </div>
        </div>

        <div>
          <div>{{ $t("route.Left") }}</div>
          <el-radio-group
            v-model="drawerValue.temp4Type"
            size="large"
            @change="temp4TypeChange"
          >
            <el-radio-button :label="$t('route.Greater_than_or_equal_to')" />
            <el-radio-button :label="$t('route.Less_than_or_equal_to')" />
            <el-radio-button :label="$t('route.Range')" />
          </el-radio-group>
          <div v-show="drawerValue.temp4Type != $t('route.Range')">
            <el-input type="number" v-model="drawerValue.temp4" class="width100px" />
          </div>
          <div v-show="drawerValue.temp4Type == $t('route.Range')">
            <el-input type="number" v-model="query.minTemp4" />
            <div>-</div>
            <el-input type="number" v-model="query.maxTemp4" />
          </div>
        </div>

        <div>
          <div>{{ $t("route.Medium") }}</div>
          <el-radio-group
            v-model="drawerValue.temp5Type"
            size="large"
            @change="temp5TypeChange"
          >
            <el-radio-button :label="$t('route.Greater_than_or_equal_to')" />
            <el-radio-button :label="$t('route.Less_than_or_equal_to')" />
            <el-radio-button :label="$t('route.Range')" />
          </el-radio-group>
          <div v-show="drawerValue.temp5Type != $t('route.Range')">
            <el-input type="number" v-model="drawerValue.temp5" class="width100px" />
          </div>
          <div v-show="drawerValue.temp5Type == $t('route.Range')">
            <el-input type="number" v-model="query.minTemp5" />
            <div>-</div>
            <el-input type="number" v-model="query.maxTemp5" />
          </div>
        </div>

        <div>
          <div>{{ $t("route.Right") }}</div>
          <el-radio-group
            v-model="drawerValue.temp6Type"
            size="large"
            @change="temp6TypeChange"
          >
            <el-radio-button :label="$t('route.Greater_than_or_equal_to')" />
            <el-radio-button :label="$t('route.Less_than_or_equal_to')" />
            <el-radio-button :label="$t('route.Range')" />
          </el-radio-group>
          <div v-show="drawerValue.temp6Type != $t('route.Range')">
            <el-input type="number" v-model="drawerValue.temp6" class="width100px" />
          </div>
          <div v-show="drawerValue.temp6Type == $t('route.Range')">
            <el-input type="number" v-model="query.minTemp6" />
            <div>-</div>
            <el-input type="number" v-model="query.maxTemp6" />
          </div>
        </div>

        <div>
          <el-button size="large" @click="clearClick" type="danger">{{
            $t("route.eliminate")
          }}</el-button>
          <el-button size="large" type="primary" @click="screenSaveClick">{{
            $t("route.sure")
          }}</el-button>
        </div>
      </div>
    </el-drawer>

    <el-dialog width="500px" v-model="dialogEditVisible">
      <el-form label-width="130px">
        <el-form-item :label="$t('route.Workshop')">
          <el-input class="input" v-model="form.workshop" />
        </el-form-item>
        <el-form-item :label="$t('route.Production_line')">
          <el-input class="input" v-model="form.proLine" />
        </el-form-item>
        <el-form-item :label="$t('route.Standard_temperature')">
          <el-input type="number" class="input" v-model="form.stdTemp" />
        </el-form-item>
        <el-form-item :label="$t('route.Left')">
          <el-input type="number" class="input" v-model="form.temp4" />
        </el-form-item>
        <el-form-item :label="$t('route.Medium')">
          <el-input type="number" class="input" v-model="form.temp5" />
        </el-form-item>
        <el-form-item :label="$t('route.Right')">
          <el-input type="number" class="input" v-model="form.temp6" />
        </el-form-item>
        <el-form-item>
          <el-button type="primary" @click="saveClick">{{ $t("route.sure") }}</el-button>
        </el-form-item>
      </el-form>
    </el-dialog>
  </div>
</template>

<script>
import http from "../../js/http/http.js";
import api from "../../js/http/api.js";
import CommonUtils from "../../js/common/common-utils.js";
import Constant from "../../js/common/constant.js";
import DateUtils from "../../js/common/date-utils";
export default {
  data() {
    return {
      query: {
        total: 0,
        pageNum: 1,
        pageSize: 10,
        kind: null,
        workshop: null,
        search: null,
        startDate: DateUtils.getDayStartDate().format("yyyy-MM-dd"),
        endDate: DateUtils.getDayEndDate().format("yyyy-MM-dd"),
        timeRange: [],
        timeIndex: "筛选时间",
        minStdTemp: null,
        maxStdTemp: null,
        minTemp4: null,
        maxTemp4: null,
        minTemp5: null,
        maxTemp5: null,
        minTemp6: null,
        maxTemp6: null,
      },
      drawerValue: {
        dateRange: null,
        stdTemp: null,
        temp4: null,
        temp5: null,
        temp6: null,
        dateType: this.$t("route.today"),
        timeType: null,
        stdTempType: null,
        temp4Type: null,
        temp5Type: null,
        temp6Type: null,
      },
      workshopList: [],
      tableData: [],
      months: ["2022-8", "2022-9", "2022-10", "2022-11"],
      monthday: "2022-11",
      isShowDrawer: false,
      uploadUrl: api.BASE_URI + api.INPUT_DEVICE_DATA1,
      dialogEditVisible: false,
      checkRows: [],
      form: {
        workshop: null,
        proLine: null,
        stdTemp: null,
        temp4: null,
        temp5: null,
        temp6: null,
      },
    };
  },
  methods: {
    deleteClick() {
      this.$confirm(this.$t("route.continue23"), this.$t("route.reminder"), {
        confirmButtonText: this.$t("route.sure"),
        cancelButtonText: this.$t("route.cancel"),
        type: "warning",
      }).then(() => {
        if (this.checkRows.length == 0) return;
        var idList = [];
        for (var item of this.checkRows) {
          idList.push(item.id);
        }
        http.post(
          api.DELETE_DEVICE_TEMP_LIST,
          {
            idList: idList,
          },
          (data) => {
            this.$message.success(this.$t("route.Delete_succeeded"));
            this.getTempList();
          }
        );
      });
    },
    saveClick() {
      var idList = [];
      for (var item of this.checkRows) {
        idList.push(item.id);
      }
      http.post(
        api.UPDATE_DEVICE_TEMP_LIST,
        {
          idList: idList,
          workshop: this.form.workshop,
          proLine: this.form.proLine,
          stdTemp: this.form.stdTemp,
          temp4: this.form.temp4,
          temp5: this.form.temp5,
          temp6: this.form.temp6,
        },
        (data) => {
          this.$message.success(this.$t("route.Edit_succeeded"));
          this.getTempList();
          this.dialogEditVisible = false;
        }
      );
    },
    selectionChange(val) {
      this.checkRows = val;
      console.log(JSON.stringify(this.checkRows));
    },
    inputSuccess(res) {
      if (res.resultCode == 0) {
        this.$message.success(this.$t("route.Import_succeeded"));
      } else {
        this.$message.error(res.resultMsg);
      }
    },
    editClick() {
      if (this.checkRows.length == 0) {
        this.$message.error(this.$t("route.Please_select_data_to_edit"));
        return;
      }
      this.dialogEditVisible = true;
    },
    extClick() {
      if (this.drawerValue.stdTempType == this.$t("route.Greater_than_or_equal_to")) {
        this.query.minStdTemp = this.drawerValue.stdTemp;
      } else if (this.drawerValue.stdTempType == this.$t("route.Less_than_or_equal_to")) {
        this.query.maxStdTemp = this.drawerValue.stdTemp;
      }
      if (this.drawerValue.temp4Type == this.$t("route.Greater_than_or_equal_to")) {
        this.query.minTemp4 = this.drawerValue.temp4;
      } else if (this.drawerValue.temp4Type == this.$t("route.Less_than_or_equal_to")) {
        this.query.maxTemp4 = this.drawerValue.temp4;
      }
      if (this.drawerValue.temp5Type == this.$t("route.Greater_than_or_equal_to")) {
        this.query.minTemp5 = this.drawerValue.temp5;
      } else if (this.drawerValue.temp5Type == this.$t("route.Less_than_or_equal_to")) {
        this.query.maxTemp5 = this.drawerValue.temp5;
      }
      if (this.drawerValue.temp6Type == this.$t("route.Greater_than_or_equal_to")) {
        this.query.minTemp6 = this.drawerValue.temp6;
      } else if (this.drawerValue.temp6Type == this.$t("route.Less_than_or_equal_to")) {
        this.query.maxTemp6 = this.drawerValue.temp6;
      }
      var params = {
        adminId: this.$store.state.user.id,
        pageNum: this.query.pageNum,
        pageSize: this.query.pageSize,
        workshop:
          this.query.workshop == this.$t("route.All_workshops")
            ? null
            : this.query.workshop,
        startDate: this.query.startDate,
        endDate: this.query.endDate,
        timeRange:
          this.query.timeRange.length == 0 ? null : JSON.stringify(this.query.timeRange),
        search: this.query.search,
        minStdTemp: this.query.minStdTemp,
        maxStdTemp: this.query.maxStdTemp,
        minTemp4: this.query.minTemp4,
        maxTemp4: this.query.maxTemp4,
        minTemp5: this.query.minTemp5,
        maxTemp5: this.query.maxTemp5,
        minTemp6: this.query.minTemp6,
        maxTemp6: this.query.maxTemp6,
      };
      const finalUrl = `${
        api.BASE_URI + api.EXT_TEMP_PRO3
      }?${CommonUtils.encodeSearchParams(params)}`;
      CommonUtils.download(finalUrl, this.$t("route.Temperature_report") + ".xlsx");
    },
    dateChange(value) {
      this.query.startDate = value[0].format("yyyy-MM-dd");
      this.query.endDate = value[1].format("yyyy-MM-dd");
    },
    timeChange(value) {
      this.query.startDate = value[0].format("HH") + ":00";
      this.query.endDate = value[1].format("HH") + ":00";
    },
    clearClick() {
      this.drawerValue.dateType = this.$t("route.today");
      this.drawerValue.timeType = null;
      this.query.startDate = DateUtils.getDayStartDate().format("yyyy-MM-dd");
      this.query.endDate = DateUtils.getDayEndDate().format("yyyy-MM-dd");
      this.query.query.timeRange = [];
      this.drawerValue.stdTempType = null;
      this.query.minStdTemp = null;
      this.query.maxStdTemp = null;
      this.drawerValue.temp4Type = null;
      this.query.minTemp4 = null;
      this.query.maxTemp4 = null;
      this.drawerValue.temp5Type = null;
      this.query.minTemp5 = null;
      this.query.maxTemp5 = null;
      this.drawerValue.temp6Type = null;
      this.query.minTemp6 = null;
      this.query.maxTemp6 = null;
      this.getTempList();
    },
    screenSaveClick() {
      this.query.pageNum = 1;
      this.getTempList();
      this.isShowDrawer = false;
    },
    handlePageChange(pageNum) {
      this.query.pageNum = pageNum;
      this.getTempList();
    },
    temp4TypeChange() {
      this.query.maxTemp4 = 300;
      this.query.minTemp4 = -20;
      if (this.drawerValue.temp4Type == this.$t("route.Greater_than_or_equal_to")) {
        this.drawerValue.temp4 = -20;
      } else if (this.drawerValue.temp4Type == this.$t("route.Less_than_or_equal_to")) {
        this.drawerValue.temp4 = 300;
      }
    },
    temp5TypeChange() {
      this.query.maxTemp5 = 300;
      this.query.minTemp5 = -20;
      if (this.drawerValue.temp5Type == this.$t("route.Greater_than_or_equal_to")) {
        this.drawerValue.temp5 = -20;
      } else if (this.drawerValue.temp5Type == this.$t("route.Less_than_or_equal_to")) {
        this.drawerValue.temp5 = 300;
      }
    },
    temp6TypeChange() {
      this.query.maxTemp6 = 300;
      this.query.minTemp6 = -20;
      if (this.drawerValue.temp6Type == this.$t("route.Greater_than_or_equal_to")) {
        this.drawerValue.temp6 = -20;
      } else if (this.drawerValue.temp6Type == this.$t("route.Less_than_or_equal_to")) {
        this.drawerValue.temp6 = 300;
      }
    },
    stdTempTypeChange() {
      this.query.maxStdTemp = 300;
      this.query.minStdTemp = -20;
      if (this.drawerValue.stdTempType == this.$t("route.Greater_than_or_equal_to")) {
        this.drawerValue.stdTemp = -20;
      } else if (this.drawerValue.stdTempType == this.$t("route.Less_than_or_equal_to")) {
        this.drawerValue.stdTemp = 300;
      }
    },
    dateTypeChange() {
      if (this.drawerValue.dateType == this.$t("route.today")) {
        this.query.startDate = DateUtils.getDayStartDate().format("yyyy-MM-dd");
        this.query.endDate = DateUtils.getDayEndDate().format("yyyy-MM-dd");
      } else if (this.drawerValue.dateType == this.$t("route.yesterday")) {
        this.query.startDate = DateUtils.getBeginYesterday().format("yyyy-MM-dd");
        this.query.endDate = DateUtils.getEndYesterday().format("yyyy-MM-dd");
      } else if (this.drawerValue.dateType == this.$t("route.This_week")) {
        this.query.startDate = DateUtils.getWeekStartDate().format("yyyy-MM-dd");
        this.query.endDate = DateUtils.getWeekEndDate().format("yyyy-MM-dd");
      } else if (this.drawerValue.dateType == this.$t("route.This_month")) {
        this.query.startDate = DateUtils.getMonthStartDate().format("yyyy-MM-dd");
        this.query.endDate = DateUtils.getMonthEndDate().format("yyyy-MM-dd");
      } else if (this.drawerValue.dateType == this.$t("route.Last_month")) {
        this.query.startDate = DateUtils.getLastMonthStartDate().format("yyyy-MM-dd");
        this.query.endDate = DateUtils.getLastMonthEndDate().format("yyyy-MM-dd");
      } else {
        this.query.startDate = DateUtils.getWeekStartDate().format("yyyy-MM-dd");
        this.query.endDate = DateUtils.getWeekEndDate().format("yyyy-MM-dd");
      }
      this.query.pageNum = 1;
      this.getTempList();
    },
    moreClick() {
      this.isShowDrawer = !this.isShowDrawer;
    },
    getTempList() {
      if (this.drawerValue.stdTempType == this.$t("route.Greater_than_or_equal_to")) {
        this.query.minStdTemp = this.drawerValue.stdTemp;
      } else if (this.drawerValue.stdTempType == this.$t("route.Less_than_or_equal_to")) {
        this.query.maxStdTemp = this.drawerValue.stdTemp;
      }
      if (this.drawerValue.temp4Type == this.$t("route.Greater_than_or_equal_to")) {
        this.query.minTemp4 = this.drawerValue.temp4;
      } else if (this.drawerValue.temp4Type == this.$t("route.Less_than_or_equal_to")) {
        this.query.maxTemp4 = this.drawerValue.temp4;
      }
      if (this.drawerValue.temp5Type == this.$t("route.Greater_than_or_equal_to")) {
        this.query.minTemp5 = this.drawerValue.temp5;
      } else if (this.drawerValue.temp5Type == this.$t("route.Less_than_or_equal_to")) {
        this.query.maxTemp5 = this.drawerValue.temp5;
      }
      if (this.drawerValue.temp6Type == this.$t("route.Greater_than_or_equal_to")) {
        this.query.minTemp6 = this.drawerValue.temp6;
      } else if (this.drawerValue.temp6Type == this.$t("route.Less_than_or_equal_to")) {
        this.query.maxTemp6 = this.drawerValue.temp6;
      }

      var timeRange = null;
      if (this.query.timeIndex == "2小时(单)") {
        timeRange = [
          "01:00",
          "03:00",
          "05:00",
          "07:00",
          "09:00",
          "11:00",
          "13:00",
          "15:00",
          "17:00",
          "19:00",
          "21:00",
          "23:00",
        ];
      } else if (this.query.timeIndex == "2小时(双)") {
        timeRange = [
          "00:00",
          "02:00",
          "04:00",
          "06:00",
          "08:00",
          "10:00",
          "12:00",
          "14:00",
          "16:00",
          "18:00",
          "20:00",
          "22:00",
        ];
      } else {
        timeRange = this.query.timeRange.length == 0 ? null : this.query.timeRange;
      }

      http.post(
        api.GET_TEMP_LIST3,
        {
          adminId: this.$store.state.user.id,
          pageNum: this.query.pageNum,
          pageSize: this.query.pageSize,
          factory: Constant.FACTORY == "全部工厂" ? null : Constant.FACTORY,
          workshop:
            this.query.workshop == this.$t("route.All_workshops")
              ? null
              : this.query.workshop,
          startDate: this.query.startDate,
          endDate: this.query.endDate,
          timeRange: JSON.stringify(timeRange),
          search: this.query.search,
          minStdTemp: this.query.minStdTemp,
          maxStdTemp: this.query.maxStdTemp,
          minTemp4: this.query.minTemp4,
          maxTemp4: this.query.maxTemp4,
          minTemp5: this.query.minTemp5,
          maxTemp5: this.query.maxTemp5,
          minTemp6: this.query.minTemp6,
          maxTemp6: this.query.maxTemp6,
        },
        (data) => {
          this.tableData = data.data.tempList;
          this.query.total = data.data.total;
        }
      );
    },
    getAllWorkshop() {
      http.post(
        api.GET_ALL_WORKSHOP_NAME,
        {
          adminId: this.$store.state.user.id,
          factory: Constant.FACTORY == "全部工厂" ? null : Constant.FACTORY,
        },
        (data) => {
          this.workshopList = data.data;
          this.workshopList.unshift(this.$t("route.All_workshops"));
        }
      );
    },
    format1(row) {
      return row.createTime.substr(0, 10);
    },
    format2(row) {
      return row.createTime.substr(11);
    },
    format3(row, column, cellValue, index) {
      return cellValue;
    },
    formatTempColorStyle(stdTemp, temp) {
      if (Math.abs(stdTemp - temp) > 6) return "color: #FF0000";
    },
  },
  created() {
    this.getAllWorkshop();
    this.getTempList();
  },
};
</script>

<style lang="scss" scoped>
.use-report {
  color: #444444;
  font-size: 18px;
  padding-right: 20px;
  height: calc(100vh - 100px);
  // overflow: scroll;
  scrollbar-width: none;
  /* firefox */
  -ms-overflow-style: none;
  /* IE 10+ */
  overflow-x: hidden;
  overflow-y: auto;

  > div {
    // display: flex;
    margin-top: 10px;
    background-color: #ffffff;
    padding: 10px;
    border-radius: 5px;
  }

  > div:nth-of-type(1) {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin-top: 20px;
    background-color: #ffffff;
    padding: 20px;
    border-radius: 5px;

    > label:nth-of-type(1) {
      font-weight: 600;
    }

    > div:nth-of-type(1) {
      width: 1px;
      background-color: #cccccc;
      height: 15px;
      margin: 0px 20px;
    }

    > button:nth-of-type(1) {
      background-image: url(../../assets/img/customer-1.png);
      background-repeat: no-repeat;
      background-size: 100% 100%;
      padding: 5px 10px;
      border: 0px;
      display: flex;
      color: #ffffff;
      flex-direction: row;
      align-items: center;
      font-weight: 800;

      > img {
        margin-right: 7px;
        width: 15px;
        height: 15px;
        content: url(../../assets/img/customer-2.png);
      }
    }
  }

  > div:nth-of-type(2) {
    display: flex;
    flex-direction: row;
    align-items: center;
  }

  > div:nth-of-type(3) {
    display: flex;
    flex-direction: column;

    > div:nth-of-type(2) {
      margin-top: 10px;
      display: flex;
      justify-content: flex-end;
      // background-color: #f00;
    }
  }

  .drawer {
    > div {
      margin-bottom: 20px;

      > div {
        margin-bottom: 10px;
      }
    }

    > div:nth-of-type(2),
    > div:nth-of-type(3),
    > div:nth-of-type(4),
    > div:nth-of-type(5) {
      > div:nth-of-type(4) {
        display: flex;
        flex-direction: row;

        > div {
          text-align: center;
          width: 100px;
        }

        > div:nth-of-type(2) {
          width: 30px;
        }
      }
    }

    > div:last-of-type {
      display: flex;
      flex-direction: row;

      > button {
        flex: 1;
      }
    }
  }

  .div-handle-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    // margin-top: 10px;
    // background-color: #f00;
  }

  .input {
    width: 300px;
  }
}
</style>
